package com.game.server;

import java.io.File;
import java.io.IOException;

import org.ini4j.Wini;

import com.base.listen.ServerListen;
import com.fastexcel.manage.ConfigManage;
import com.google.protobuf.InvalidProtocolBufferException;
import com.modle.manage.ModleManage;
import com.msg.pub.Client;


public class GameServer extends ServerListen {

    public GameServer(int port) {
		super(port);
	}

	public static void main(String[] args) {	
		{
			try {
				Wini ini = new Wini(new File(""));
		        String codeType = ini.get("qrCode", "code");
		        System.out.println(codeType);
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		{
			Client.obj_user_info info = Client.obj_user_info.newBuilder().setCoin(199999).setStrCoin("ces").build();
			System.out.println(info);
			byte[] msgbyte = info.toByteArray();
			
			try {
				Client.obj_user_info pppInfo = Client.obj_user_info.parseFrom(msgbyte);
				System.out.println(pppInfo);
			} catch (InvalidProtocolBufferException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		ConfigManage.getDataIndex();
		ModleManage.getInstance().InitThread();
        int port = 1011;
        new GameServer(port).run();
    }
}
